#include  <stdio.h>
#include  <string.h>
int main()
{
    int age;
    char name[10];
    float weight;
    char s2[50]={"hajifeng 21 59.0"};
    char s3[50]={"name:hajifeng age:21 weight:59.0"};
    sscanf(s2,"%s %d %f\n",name,&age,&weight);
    printf("%s %d %f\n",name,age,weight);
    sscanf(s3,"name:%s age:%d weight:%f\n",name,&age,&weight);
    printf("name:%s age:%d weight:%f",name,age,weight);
}